<?php
/********/
/* video */
/********/

define("T_video","pms_plug_video");

/* selection (liste)*/
$sql['video']['select_video']="SELECT * FROM ".T_video." ORDER BY video_date DESC";
$sql['video']['select_video_nb']="SELECT COUNT(*) AS nb FROM ".T_video." ";
$sql['video']['select_video_condition']="SELECT * FROM ".T_video." {condition} {order} {limit}";

/* selection (details) */
$sql['video']['select_video_details'] = "SELECT * FROM ".T_video." WHERE video_id='{id}'";

/* insertion */
$sql['video']['insert_video']="INSERT INTO ".T_video." (video_name, video_catid, video_url, video_description, video_date, video_status) VALUES ('{name}','{catid}','{url}','{description}','{date}','{status}')";  

# modification
$sql['video']['edit_video']="UPDATE ".T_video." SET video_name='{name}' 
                            , video_catid='{catid}'
                            , video_url='{url}'
                            , video_description='{description}'
                            , video_date='{date}'
                            , video_status='{status}'
                            WHERE video_id='{id}' ";

/* verification */
// $sql['video']['verif_presence_video']="SELECT video_id FROM ".T_video." WHERE video_date='{date}' AND video_id!='{id}'";

/* suppression */
$sql['video']['sup_video']="DELETE FROM ".T_video." WHERE video_id='{id}'";
?>